package tech.yunland.shop.domain.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.moyuer.bsf.domain.model.AbstractEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by v on 17-7-3.
 */
@Entity
@Table(name = "dormitories")
public class Dormitories extends AbstractEntity {

    @Column
    private String dname;

    @Column
    private Integer size;

    @Column
    private Integer quantity;

    @JSONField(format = "yyyy-MM-dd hh:mm:ss")
    @Column(name = "create_time",nullable = false)
    private Date createTime = new Date();

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public String getDname() {
        return dname;
    }

    public void setDname(String dname) {
        this.dname = dname;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
